package com.example.test_system.mapper;

import com.example.test_system.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from user where username=#{username} and password=#{password}")
    public User find_user(String username, String password);

    @Select("select * from user")
    public List<User> list_user();

    @Insert("insert into user(username, password) values(#{username}, #{password})")
    public void insert_user(User user);
}
